using System;
using EPiServer.Community.ImageGallery;

namespace EPiAbstractions.Community.ImageGallery
{
    public class ImageActionHandlerFacade : IImageActionHandlerFacade
    {
        private static ImageActionHandlerFacade _instance;

        public static ImageActionHandlerFacade Instance
        {
            get
            {
                if (_instance == null)
                    _instance = new ImageActionHandlerFacade();

                return _instance;
            }

            set { _instance = value; }
        }

        #region IImageActionHandlerFacade Members

        public virtual ImageAction RotateImage90(String sourcefile, String destinationfile, Boolean cw)
        {
            return ImageActionHandler.RotateImage90(sourcefile, destinationfile, cw);
        }

        public virtual ImageAction Crop(String sourcefile, String destinationfile, Int32 origw, Int32 origh, Int32 x, Int32 y, Int32 w,
                                        Int32 h)
        {
            return ImageActionHandler.Crop(sourcefile, destinationfile, origw, origh, x, y, w, h);
        }

        #endregion
    }
}